import React, { Component } from "react";
import { BlockList,Footer,NewsList,ProductList,UserList,Xiangce} from "../Components";
import {connect} from 'react-redux';


class Home extends Component {
  
  render() {
    // console.log(ProductList,11111111111,UserList)
    const {count,lists,update} = this.props
    return (
      <div className="container marketing">
         <div className="row">
          <div className="col-lg-4">
            <div className="input-group">
              <input type="text" className="form-control" placeholder="搜索"/>
              <span className="input-group-btn">
                <button className="btn btn-default" type="button">搜索</button>
              </span>
            </div>
          </div>
        </div>
        <div>
          
           <div>
            <NewsList/>
          </div>
         <div>
            <ProductList/>
          </div>
          <div>
            <UserList/>
          </div>
          <div>
            <Xiangce/>
          </div> 
         
        </div> 
        {/* <BlockList/> */}
        <Footer/> 
      </div>

      
    );
  }
};
const mapStateToProps = (state)=>{
  // console.log(state)//现在的state是一个对象，包含news:reducer和product:update两个对象
  return {
    count:state.news.count,
    update:state.product.update,
    lists:state.news.lists
  }
};
export default connect(mapStateToProps,{})(Home);

